require "Utilities/all"
require "GameWorld/all"

class Vulcan
  include Utilities::HexDump
  include Utilities::Configuration
  include GameWorld::GameServer
  
  def initialize(config)
    @config = config
  end

  def start
    print dump "test"
    @server = Server.new(@config.host, @config.port)

    @server.login(@config.username, @config.password)
    @server.select_world(@config.world)
    @server.select_character(@config.character)
    @avatar = @server.avatar
    
    @avatar.move(100, 100)
    @avatar.cast_skill(100, 100)
    @avatar.use_item("red potion")
  end

  def is_connected?
    true
  end
end

if __FILE__ == $0
  bot = Vulcan.new(Utilities::Configuration::Config.new)
  bot.start
  #while(bot.is_connected)
  #  sleep(100)
  #end
end
